# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: dorphell <dorphell@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=httptunnel
pkgver=3.3
pkgrel=8
pkgdesc="Creates a bidirectional virtual data connection tunnelled in HTTP requests"
arch=('loong64' 'x86_64')
url="https://github.com/larsbrinkhoff/httptunnel"
license=('GPL2')
depends=('glibc')
source=("https://ftp.gnu.org/pub/gnu/${pkgname}/$pkgname-$pkgver.tar.gz"
        'httptunnel-3.3-build-fix.patch')
md5sums=('493cc0f5f21e9955db27ee9cd9a976d5'
         '65c1f8a2a847fb4af106c9358f9e0be8')
sha256sums=('142f82b204876c2aa90f19193c7ff78d90bb4c2cba99dfd4ef625864aed1c556'
            'c5580f347a4641507e8396cd439df8d5155724b42b93bf2d98bfdbc63655c6cd')

prepare() {
  cd "${srcdir}"/$pkgname-$pkgver
  patch -p0 -i ../httptunnel-3.3-build-fix.patch
}

build() {
  cd "${srcdir}"/$pkgname-$pkgver
  ./configure --prefix=/usr --mandir=/usr/share/man
  make
}

package() {
  cd "${srcdir}"/$pkgname-$pkgver
  make DESTDIR="${pkgdir}" install
}
